package com.mars.admin.modules.goods.entity;

import com.mars.admin.modules.base.entity.BaseEntity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品分类实体
 *
 * @author Mars
 * @version 1.0
 * @date 2025-01-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table("tb_goods_category")
@Schema(description = "商品分类")
public class GoodsCategory extends BaseEntity {

    /**
     * 分类ID
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "分类ID", example = "1")
    private Long id;

    /**
     * 父分类ID，0为根分类
     */
    @Schema(description = "父分类ID", example = "0")
    private Long parentId;

    /**
     * 分类名称
     */
    @Schema(description = "分类名称", example = "户外装备")
    private String categoryName;

    /**
     * 分类编码
     */
    @Schema(description = "分类编码", example = "outdoor_equipment")
    private String categoryCode;

    /**
     * 分类图标
     */
    @Schema(description = "分类图标", example = "https://example.com/icon.png")
    private String categoryIcon;

    /**
     * 分类横幅
     */
    @Schema(description = "分类横幅", example = "https://example.com/banner.png")
    private String categoryBanner;

    /**
     * 分类描述
     */
    @Schema(description = "分类描述", example = "专业户外装备")
    private String description;

    /**
     * 排序
     */
    @Schema(description = "排序", example = "1")
    private Integer sortOrder;

    /**
     * 分类层级：1-一级，2-二级，3-三级
     */
    @Schema(description = "分类层级", example = "1")
    private Integer level;

    /**
     * 分类路径，如：1,2,3
     */
    @Schema(description = "分类路径", example = "1,2,3")
    private String path;

    /**
     * 是否显示：0-否，1-是
     */
    @Schema(description = "是否显示", example = "1")
    private Integer isShow;

    /**
     * 状态：0-禁用，1-正常
     */
    @Schema(description = "状态", example = "1")
    private Integer status;

}
